import QtQuick 1.0

Rectangle {
    property bool hidden: true
    y: hidden ? parent.height + 1 : parent.height - height / 2
    color: root.constants.transparentColor

    Behavior on y {
        NumberAnimation { duration: root.constants.shortAnimationDuration }
    }

    Row {
        property int buttonCount: 2
        property int buttonWidth: width / buttonCount - spacing / 2

        width: parent.width - spacing * 2
        height: parent.height
        anchors.horizontalCenter: parent.horizontalCenter
        spacing: parent.width * root.constants.navigationBarRelativeSpacing

        NavigationButton {
            id: mainViewButton
            width: parent.buttonWidth
            height: parent.height
            selected: viewSwitcher.currentView == mainView
            iconFilename: "main_view_icon.png"

            onTapped: {
                if (!viewSwitcher.running) {
                    viewSwitcher.switchView(mainView, true);
                }
            }
        }

        NavigationButton {
            id: informationViewButton
            width: parent.buttonWidth
            height: parent.height
            selected: viewSwitcher.currentView == infoView
            iconFilename: "information_icon.png"

            onTapped: {
                if (!viewSwitcher.running) {
                    viewSwitcher.switchView(infoView, false);
                }
            }
        }
    }
}

// End of file.
